<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Repositories\CachingUserRepository;
use App\Services\UserService;
class UserController extends Controller
{
  protected $user;
  protected $service;
  public function __construct(CachingUserRepository $user,UserService $service){
    $this->user=$user;
    $this->service=$service;
  }

    public function show($id){
      $hash=$this->service->hash('secret');
      return view('user.profile',['user' => $this->user->find($id),'hash'=>$hash]);
    }
}
